#pragma once
#include "base/BaseInc.h"
#include "BSUtility.h"
#include "base/Control.h"
enum ScrollBarOrient {
	Vertical,
	Horizental
};
class ScrollBar : public Control {
public:
	ScrollBar(){}
	~ScrollBar(){}
	virtual bool OnInit();
	virtual void OnDraw();
	virtual void onMouseButtonUp(int button, int x, int y);
	virtual void onMouseButtonDown(int button, int x, int y);
	virtual void onMouseMove(int x, int y);
	float percent{0};
	ScrollBarOrient orient{ Horizental };
	bool isMouseDown{false};
};
RegisterBlueprintClass(ScrollBar)

class ScrollPanel2 : public Control {
public:

	virtual bool OnInit();
	virtual void OnDraw();
	virtual void onMouseButtonUp(int button, int x, int y);
	virtual void onMouseButtonDown(int button, int x, int y);
	virtual void onMouseMove(int x, int y);
	virtual bool SetAttribute(const char* attrName, const char* attrVal);
	virtual void ParseXmlElement(TiXmlElement* ele);
	Control* CreateControl(std::string sControlClassName);
	ScrollBar* scrollBar{nullptr};
};
RegisterBlueprintClass(ScrollPanel2)